***Author: Will McGrew
***This version 01/25/2021


capture program drop PrintEst
program PrintEst
	args est name txtb4 txtaftr decim dir
	di `est'
	di "`name'"
	tempname sample
	file open `sample' using  "`dir'/`name'.txt", text write replace
	*local est_rounded = round(`est', 0`decim')
	local est_rounded : di %`decim' `est'
	file write `sample'  `"`txtb4'`est_rounded'`txtaftr'"'
	file close `sample'
end
